package deatax;

import deatax.display.Texture;
import java.awt.Image;
import java.util.ArrayList;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author pson
 */
public class Resource {
    
    
    /**
     * Name of the resource
     */
    private String name;
    
    /**
     * The main type of this resource
     */
    private ArrayList<String> tags;

    private Image icon;
    private int score;
    
    public Resource(String name, int score) {
        this.name = name;
        this.score = score;
        this.icon = Texture.loadImage("icons/" + name.toLowerCase() + ".png");
        tags = new ArrayList<String>();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public void addTag(String s) {
        this.tags.add(s);
    }
    
    public boolean hasTag(String s) {
        return tags.contains(s);
    }

    public ArrayList<String> getTags() {
        return tags;
    }

    public Image getIcon() {
        return icon;
    }

    public void setIcon(Image icon) {
        this.icon = icon;
    }
    
}
